unit SmallStruct.Core;

interface

uses Classes;

const
  SS_CLASS_TABLE_LOADER = 'CLASS_TABLE_LOADER';

type
  ISSObjectContext = interface;

  ISSObject = interface
    ['{927AB448-1B54-49B0-9456-19200DA5A8EB}']
    function GetObjectInstance: TComponent;
    procedure ReleaseObjectInstance;
  end;

  ISSRuntimeObject = interface(ISSObject)
    ['{761A1D6F-6064-446B-88A0-9F79EA774D22}']
    function GetContext: ISSObjectContext;
    procedure SetContext(AObjectContext: ISSObjectContext);
    procedure InitObject;
  end;

  ISSObjectContainer = interface(ISSObject)
    ['{076D82BB-03C4-497F-A23D-85CE5A27F07B}']
    function FindObject(const AObjectName: string): Integer;
    function GetCount: Integer;
    function GetObject(const AIndex: Integer): TComponent; overload;
    function GetObject(const AObjectName: string): TComponent; overload;
    function GetObjectName(const AIndex: Integer): string;
    procedure AppendObject(const AObjectName: string; AObjectInstance: TComponent);
    procedure ReleaseObject;
    procedure RemoveObject(const AIndex: Integer); overload;
    procedure RemoveObject(const AObjectName: string); overload;
    procedure RemoveObject; overload;
  end;

  ISSConfiguration = interface(ISSObject)
    ['{50E2958F-FABA-452F-8F58-05B7EBC1AFE0}']
  end;

  ISSObjectContext = interface(ISSObject)
    ['{9E90C585-3A90-4647-98D8-E4B95A90CB6E}']
    function GetConfiguration: ISSConfiguration;
    function GetParameter: ISSObjectContainer;
  end;

  ISSClassTable = interface(ISSObject)
    ['{E51166BD-18F2-44C1-83EE-40A6D05B2B1A}']
    function QueryClass(const AClassName: string): TComponentClass;
    procedure RegisterClass(const AClassName: string; AClass: TComponentClass);
    procedure UnregisterClass(const AClassName: string);
  end;

  ISSClassTableLoader = interface(ISSObject)
    ['{4444F4BB-C5D4-4542-9EE8-CFBA6E5EAA01}']
    procedure LoadClassTable(AClassTable: ISSClassTable);
  end;

  ISSSystemObject = interface(ISSObject)
    ['{02BA0F32-335D-45F0-949E-12E11E312F64}']
    function GetClassTable: ISSObject;
    function GetConfigurationTable: ISSObject;
    function GetGlobalObjectTable: ISSObject;
    function GetResourceTable: ISSObject;
  end;

implementation

end.
